package com.cherrish;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author cherrish
 * @time 2018-09-03 10:58
 * @name ScheduleTimer
 * @desc:
 */
@Component
public class ScheduleTimer {
    @Autowired
    SinkSender sender;
    @Scheduled(fixedRate = 3000)
    public void send(){
        sender.send("定时调用发送消息" + new Date());
    }
}
